<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>商品详情</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/detail.css" />
</head>
<body>
<div class="prodetail">
    <eq name="focus" value="0">
        <div class="attention">
            <div class="logo">
                <img src="__PUBLIC__/Wx/img/logo02.png"/>
                <h3>乡土味士</h3>
            </div>
            <i><input type="button" value="立即关注" class="gz"/></i>
        </div>
    </eq>
    <div class="swipePanel">
        <div class="swipe">
            <ul id="slider">
                <volist name="goods['head_img']" id="v">
                    <li><a href="javascript:void(0)"><img src="{$v}" alt='' /></a></li>
                </volist>
                <!--<li><a href="javascript:void(0)"><img src="__PUBLIC__/Wx/images/pic07.jpg" alt='' /></a></li>-->
                <!--<li><a href="javascript:void(0)"><img src="__PUBLIC__/Wx/images/pic07.jpg" alt='' /></a></li>-->
            </ul>
            <div id="pagenavi">
                <volist name="goods['head_img']" id="v">
                    <a href="javascript:void(0);" class="active">{$key+1}</a>
                </volist>
                <!--<a href="javascript:void(0);">2</a>-->
                <!--<a href="javascript:void(0);">3</a>-->
            </div>
        </div>
    </div>
    <div class="proname">
        <h2><b class="md" <eq name="goods['u_id']" value="0">style="background: #06d1de;"</eq> ><?=$goods['u_id']>0?'门店':'品牌';?></b><span>{$goods.title}{$goods.u_num}<?=getunit($goods['unit'])?>装包邮 </span></h2>
        <h3><strong>市场参考价:{$goods.price}</strong><span>剩余库存<b>{$goods.num}</b>份</span></h3>
    </div>
    <div class="proprice">
        <!--<h2>兑换方式（纯积分）<span>钻石|白金可兑</span></h2>-->
        <volist name="goods['get_price']" id="vo">
            <p><span>{$key}</span><b>
                <neq name="vo['level_cash']" value="0"><?=$vo['level_cash'].'元';?></neq>
                <if condition="($vo['level_cash'] gt 0) AND ($vo['level_integral'] gt 0)">+</if>
                <neq name="vo['level_integral']" value="0"><?=$vo['level_integral'].'积分';?></neq>
            </b></p>
        </volist>
        <!--<p><span>黄金会员</span><b>2000积分</b></p>-->
        <!--<p><span>白金会员</span><b>2000积分</b></p>-->
        <!--<p><span>钻石会员</span><b>1000积分</b></p>-->
    </div>
    <div class="word">
        <h2>兑换须知</h2>
        <div class="inner">
            <p>1.本产品为恩施扶贫产品，需购买恩施地区的产品后，才可兑换该产品。</p>
            <p>2.兑换成功后，会收到取货码和通知，凭取货码到社区店取货</p>
            <p>3.社区店直接取货，产品质量有保证。</p>
        </div>
    </div>
    <!--<div class="comment">-->
        <!--<h2>商品评价<a href="evaluatelist.html">2348</a></h2>-->
        <!--<ul>-->
            <!--<li>-->
                <!--<div class="top">-->
                    <!--<div class="pic"><img src="__PUBLIC__/Wx/images/pic08.jpg"/></div>-->
                    <!--<h3>万倩</h3><b>安阳</b><time>2018-05-06</time>-->
                <!--</div>-->
                <!--<div class="wz">-->
                    <!--<p>很不错的农产品，很喜欢以后还会再来的，也给朋友们推荐了，很不错希望还能吃到更多地地道道的农产品。</p>-->
                    <!--<p><img src="__PUBLIC__/Wx/images/pic09.jpg"/><img src="__PUBLIC__/Wx/images/pic10.jpg"/><img src="__PUBLIC__/Wx/images/pic11.jpg"/></p>-->
                <!--</div>-->
                <!--<div class="number"><span>20</span><span style="background:url(__PUBLIC__/Wx/img/comm.png) no-repeat left center; background-size:20px 20px;">2</span></div>-->
            <!--</li>-->
        <!--</ul>-->
    <!--</div>-->
    <div class="propic">
        <h2>商品详情</h2>
        <div class="intro"><volist name="goods['con_img']" id="vo"><img src="{$vo}"/></volist></div>
    </div>
    <div class="bot"><a href="__MODULE__/Index/index" style="background: url(__PUBLIC__/New/image/home1.png) no-repeat center 5px;background-size: 25px 25px;">我的社区</a><span class="sc">收藏</span><i onClick="exchange()" style="line-height:50px; font-size:18px;"><b>立即兑换</b></i><i class="click"><b>社区二次分拣</b><b>开心享受美味</b></i></div>
    <!--等级提示-->
    <div class="hint">
        <div class="shadow">
            <div class="close"></div>
            <div class="succeed">
                <h2>温馨提示</h2>
                <p>抱歉，您的会员等级不够，无法兑换该商品</p>
                <p>拼团可以提升会员等级哦！</p>
                <p style="padding:0; height:40px; position:absolute; width:100%; bottom:0;"><input type="button" value="拼团提升会员等级" class="right"  onclick="window.location.href='house.html'" style="width:100%"></p>
            </div>
        </div>
    </div>
    <div class="page">
        <div class="close"></div>
        <div class="inner">
            <div class="pic"><img src="__PUBLIC__/Wx/images/pic14.jpg"/><p>长按图片【识别二维码】关注公众号</p></div>
            <div class="step">
                <h2>无法识别二维码</h2>
                <p>1.打开微信，点击“添加朋友”</p>
                <p>2.点击“公众号”</p>
                <p>3.搜索公众号：“乡土味士”</p>
                <p>4.点击：关注“，完成</p>
            </div>
        </div>
        <div class="botword">社区组团预定偏远山区农产品，既能吃到好吃味道又能帮助他们</div>
    </div>
</div>
<!--引用悬浮公共导航文件-->
<include file="Public:nav" />
<script type="text/javascript" src="__PUBLIC__/Wx/js/touchScroll.js"></script>
<script type="text/javascript" src="__PUBLIC__/Wx/js/touchslider.js"></script>
<script type="text/javascript">
    var active = 0, as = document.getElementById('pagenavi').getElementsByTagName('a');
    for ( var i = 0; i < as.length; i++) {
        (function() {
            var j = i;
            as[i].onclick = function() {
                t.slide(j);
                return false;
            };
        })();
    }
    var t = new TouchSlider({
        id : 'slider',
        speed : 600,
        timeout : 2000,
        before : function(index) {
            as[active].className = '';
            active = index;
            as[active].className = 'active';
        }
    });
</script>
<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script type="text/javascript">
    //立即兑换
    function  exchange() {
        var gid = {$goods['id']};
        $.post("__MODULE__/Exchange/detection",{'gid':gid},function (d) {
            // console.log(d);
            if(d.info){
                if(d.url){
                    layer.msg(d.info, {icon:1,time:3000},
                        function(){
                            window.location.href= d.url;
                        });
                }else{
                    layer.msg(d.info, {icon:1,time:3000});
                }//end if
            }else{
                window.location.href="__MODULE__/Exchange/order/gid/"+gid;
            }//end if



        });//end post
    }//end fun

    $(".click span").click(function(){
        if($(this).text() ==="导航"){
            $(this).text("收起");
            $('.link02').css('display','block')
        }else{
            $(this).text("导航");
            $('.link02').css('display','none')
        }//end if
    });//end fun

    $('.hint .close').click(function(){
        $('.hint').css('display','none')
    });
    $('.gz').click(function(){
        $('.page').css('display','block')
    });
    $('.page .close').click(function(){
        $('.page').css('display','none')
    });
</script>
<include file="Public/share" title="{$goods['title']}" desc="积分兑换！" imgurl="{$goods['head_img'][0]}" />
</body>
</html>